package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingLevelDto;
import com.zzyl.entity.nursing.NursingLevel;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingLevelMapper {
	/**
	 * 查询护理等级列表
	 * @return
	 */
	List<NursingLevelVo> selectNursingLevelVoList();
	
	/**
	 * 新增护理等级
	 * @param nursingLevel
	 * @return
	 */
	int insertOne(NursingLevel nursingLevel);
	
	/**
	 * 分页查询
	 * @param nursingLevel
	 * @return
	 */
	Page<NursingLevelVo> selectPage(NursingLevel nursingLevel);
	
	/**
	 * 根据主键查询
	 * @param id
	 * @return
	 */
	NursingLevelVo selectVoById(Long id);
	
	/**
	 * 根据主键修改
	 * @param nursingLevel
	 * @return
	 */
	int updateById(NursingLevel nursingLevel);
	
	/**
	 * 根据主键删除
	 * @param id
	 * @return
	 */
	int deleteById(Long id);

	List<NursingLevelVo> listAll();

	void InsertAll(NursingLevelDto nursingLevelDto);

	Page<NursingLevelVo> PageAll(String name, Integer status);
@Select("select * from nursing_level where id = #{id}")
	NursingLevelVo GetidAll(Integer id);

	void uqdateidAll(NursingLevelVo nursingLevelVo);
@Delete("DELETE FROM nursing_level where id = #{id}")
	void DeleteAll(Integer id);
@Select("select plan_id from nursing_level where id = #{id}")
	Integer resture(Integer id);

	void BootdisableAll(Integer id, Integer status);
}